package com.example.demo.service;

import com.example.demo.entity.UserInfo;
import com.example.demo.mapper.UserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author vivi
 * @description
 * @date 2024/6/1
 */
@Service
public class UserService {

    @Resource
    private UserMapper userMapper;

    public int reg(UserInfo userInfo) {
        return userMapper.reg(userInfo);
    }

    public UserInfo getUserByName(String username) {
        return userMapper.getUserByName(username);
    }

    public UserInfo getUserById(int id) {
        return userMapper.getUserById(id);
    }

}























